import request from '@/utils/request'

export default {
    // 分页条件查询标签列表
    getList(query, current = 1, size = 20) {
        return request({ // Promise
            url: `/article/advert/search`,
            method: 'post',
            data: {...query, current, size }

        })
    },
    add(data) {
        return request({ // Promise
            url: `/article/advert`,
            method: 'post',
            data

        })
    },
    getById(id) {
        return request({ // Promise
            url: `/article/advert/${id}`,
            method: 'get',


        })
    },
    update(data) {
        return request({ // Promise
            url: `/article/advert`,
            method: 'put',
            data

        })
    },
    deleteById(id) {
        return request({ // 获取正常的分裂和标签
            url: `/article/advert/${id}`,
            method: 'delete',
        })
    }
}